inherited crdKindsmanEdit: TcrdKindsmanEdit
  Left = 520
  Top = 467
  VertScrollBar.Range = 0
  BorderStyle = bsDialog
  Caption = #1048#1079#1084#1077#1085#1077#1085#1080#1077' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1086#1081' '#1089#1074#1103#1079#1080
  ClientHeight = 197
  ClientWidth = 394
  OldCreateOrder = True
  OnCreate = FormCreate
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Label4: TLabel [0]
    Left = 6
    Top = 118
    Width = 74
    Height = 13
    Alignment = taRightJustify
    AutoSize = False
    Caption = #1089' '#1076#1072#1090#1099
  end
  object Label5: TLabel [1]
    Left = 6
    Top = 146
    Width = 74
    Height = 13
    Alignment = taRightJustify
    AutoSize = False
    Caption = #1087#1086' '#1076#1072#1090#1091
  end
  object Label3: TLabel [2]
    Left = 6
    Top = 84
    Width = 74
    Height = 29
    Alignment = taRightJustify
    AutoSize = False
    Caption = #1054#1090#1085#1086#1096#1077#1085#1080#1077#13#10#1088#1086#1076#1089#1090#1074#1077#1085#1085#1080#1082#1072
  end
  object Label2: TLabel [3]
    Left = 6
    Top = 34
    Width = 74
    Height = 13
    Alignment = taRightJustify
    AutoSize = False
    Caption = #1056#1086#1076#1089#1090#1074#1077#1085#1085#1080#1082
  end
  object Label6: TLabel [4]
    Left = 6
    Top = 56
    Width = 74
    Height = 27
    Alignment = taRightJustify
    AutoSize = False
    Caption = #1054#1090#1085#1086#1096#1077#1085#1080#1077#13#10#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
  end
  object DBText1: TDBText [5]
    Left = 86
    Top = 6
    Width = 300
    Height = 17
    DataField = 'NAME1'
    DataSource = dscKindsman
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold, fsUnderline]
    ParentFont = False
  end
  object Label1: TLabel [6]
    Left = 6
    Top = 6
    Width = 74
    Height = 13
    Alignment = taRightJustify
    AutoSize = False
    Caption = #1043#1088#1072#1078#1076#1072#1085#1080#1085
  end
  object DBText2: TDBText [7]
    Left = 86
    Top = 34
    Width = 300
    Height = 17
    DataField = 'NAME2'
    DataSource = dscKindsman
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold, fsUnderline]
    ParentFont = False
  end
  object DBText3: TDBText [8]
    Left = 86
    Top = 62
    Width = 300
    Height = 17
    DataField = 'RELATION1'
    DataSource = dscKindsman
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold, fsUnderline]
    ParentFont = False
  end
  object DBText4: TDBText [9]
    Left = 86
    Top = 89
    Width = 300
    Height = 17
    DataField = 'RELATION2'
    DataSource = dscKindsman
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold, fsUnderline]
    ParentFont = False
  end
  inherited Panel1: TPanel
    Top = 170
    Width = 394
    inherited BitBtn1: TBitBtn
      Left = 187
    end
    inherited BitBtn2: TBitBtn
      Left = 289
    end
  end
  inherited ToolBar1: TToolBar
    Width = 394
    Height = 0
  end
  object DBDateTimeEditEh1: TDBDateTimeEditEh [12]
    Left = 86
    Top = 116
    Width = 77
    Height = 19
    AlwaysShowBorder = True
    DataField = 'BDATE'
    DataSource = dscKindsman
    EditButtons = <>
    Flat = True
    Kind = dtkDateEh
    TabOrder = 2
    Visible = True
  end
  object DBDateTimeEditEh2: TDBDateTimeEditEh [13]
    Left = 86
    Top = 145
    Width = 77
    Height = 19
    AlwaysShowBorder = True
    DataField = 'EDATE'
    DataSource = dscKindsman
    EditButtons = <>
    Flat = True
    Kind = dtkDateEh
    TabOrder = 3
    Visible = True
  end
  object DBCheckBoxEh1: TDBCheckBoxEh [14]
    Left = 184
    Top = 116
    Width = 97
    Height = 17
    Caption = #1063#1083#1077#1085' '#1089#1077#1084#1100#1080
    DataField = 'NEAR_RELATION'
    DataSource = dscKindsman
    ReadOnly = True
    TabOrder = 4
    ValueChecked = '1'
    ValueUnchecked = '0'
  end
  inherited ActionList1: TActionList
    Left = 308
    Top = 14
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
  end
  object dsKindsman: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE FAMILY'
      'SET '
      '    BDATE = :BDATE,'
      '    EDATE = :EDATE'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    SelectSQL.Strings = (
      'select f1.id, c1.name as name1, prr1.name as relation1,'
      'c2.name as name2, prr2.name as relation2,'
      'f1.bdate, f1.edate, f1.near_relation'
      '  from family f1'
      '  join clients c1 on f1.kinsman_id = c1.id'
      '  left join pas_rrelation prr1 on prr1.id = f1.ten_relation'
      '  join clients c2 on f1.tenant_id = c2.id'
      '  left join pas_rrelation prr2 on prr2.id = f1.kins_relation'
      'where f1.id = :fam_id'
      'and f1.kinsman_id = :pclient_id'
      'union'
      'select f1.id, c2.name as name1, prr2.name as relation1,'
      'c1.name as name2, prr1.name as relation2,'
      'f1.bdate, f1.edate, f1.near_relation'
      '  from family f1'
      '  join clients c1 on f1.kinsman_id = c1.id'
      '  left join pas_rrelation prr1 on prr1.id = f1.ten_relation'
      '  join clients c2 on f1.tenant_id = c2.id'
      '  left join pas_rrelation prr2 on prr2.id = f1.kins_relation'
      'where f1.tenant_id = :pclient_id'
      'and f1.id = :fam_id')
    Transaction = trKindsman
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Left = 340
    Top = 50
    object dsKindsmanID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsKindsmanNAME1: TFIBStringField
      FieldName = 'NAME1'
      Size = 120
      EmptyStrToNull = True
    end
    object dsKindsmanRELATION1: TFIBStringField
      FieldName = 'RELATION1'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindsmanNAME2: TFIBStringField
      FieldName = 'NAME2'
      Size = 120
      EmptyStrToNull = True
    end
    object dsKindsmanRELATION2: TFIBStringField
      FieldName = 'RELATION2'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindsmanBDATE: TFIBDateField
      FieldName = 'BDATE'
    end
    object dsKindsmanEDATE: TFIBDateField
      FieldName = 'EDATE'
    end
    object dsKindsmanNEAR_RELATION: TFIBSmallIntField
      FieldName = 'NEAR_RELATION'
    end
  end
  object trKindsman: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    CSMonitorSupport.Enabled = csmeDatabaseDriven
    Left = 306
    Top = 50
  end
  object dscKindsman: TDataSource
    DataSet = dsKindsman
    Left = 368
    Top = 49
  end
end
